package coursesmaritimes.obtention.client;
import java.awt.Point;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


/**Classe de calcult GPX
 *
 * @author csuma
 */
public class GPX {

    public String participant;
    public String lat;
    public String lon;
    public String date;
    /**
     * Calcul la distance entre chaque participant et le point d'arrivé
     * @param arrive : le point d'arrivé
     * @return la distance calculée
     */
    double calculDistance(Point arrive) {
        double X, Y;
        X = arrive.x - Double.parseDouble(this.lon);
        Y = arrive.y - Double.parseDouble(this.lat);
        return Math.sqrt(X + Y);
    }
}
